<form id="form_dadosresp" name="form_dadosresp" class="form-horizontal"
	action="<?php echo url_for('aluno/salvarDadosResponsavel'.(!$form->getObject()->isNew() ? '?id_aluno='.$form->getObject()->getIdAluno() : '')) ?>"
	method="post">
	<input type="hidden" name="id_aluno" value="<?php echo $form->getObject()->getIdAluno() ?>" /> 
	<input type="hidden" name="id_dados_responsavel" value="<?php echo $responsavelForm->getObject()->getIdDadosResponsavel() ?>" /> 
	
<table class="table table-striped table-bordered table-condensed">
	<tbody>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nm_responsavel']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nm_responsavel'];?></td>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['ds_grau_parentesco']->renderLabel();?></th>
			<td><?php echo $responsavelForm['ds_grau_parentesco']; ?></td>
		</tr>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['dt_nascimento']->renderLabel();?></th>
			<td><?php echo $responsavelForm['dt_nascimento'];?></td>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nu_identidade']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nu_identidade'];?></td>
		</tr>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['ds_expedida_por']->renderLabel();?></th>
			<td><?php echo $responsavelForm['ds_expedida_por'];?></td>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nu_cpf']->renderLabel();?></th>
			<td>
				<?php 
					include_component('apoio', 'campoCPF', 
						array(
							'name' => 'aluno[responsavel][nu_cpf]',
							'value' => $responsavelForm['nu_cpf'],
							'options' => array(
								'id' => 'responsavel_nu_cpf'
							),
							'opt' => array(
								'prefix' => 'responsavel_'
							)
						)
					)
				?>
			</td>
		</tr>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nu_telefone']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nu_telefone'];?></td>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nu_telefone_comercial']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nu_telefone_comercial'];?></td>
		</tr>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nu_telefone_celular']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nu_telefone_celular'];?></td>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nm_profissao']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nm_profissao'];?></td>
		</tr>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nm_empresa']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nm_empresa'];?></td>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['nm_cargo']->renderLabel();?></th>
			<td><?php echo $responsavelForm['nm_cargo']; ?></td>
		</tr>
		<tr>
			<th nowrap="nowrap" width="150px"><?php echo $responsavelForm['vl_salario']->renderLabel();?></th>
			<td><?php echo $responsavelForm['vl_salario']; ?></td>
			<th><?php echo $responsavelForm['endereco']['nu_cep']->renderLabel(); ?></th>
			<td><?php echo $responsavelForm['endereco']['nu_cep'] ?><?php echo form_error('nu_cep'); ?></td>
		</tr>
		<tr>
			<th><?php echo $responsavelForm['endereco']['logradouro']->renderLabel(); ?></th>
			<td><?php echo $responsavelForm['endereco']['logradouro'] ?><?php echo form_error('logradouro'); ?></td>
			<th><?php echo $responsavelForm['endereco']['cidade']->renderLabel(); ?></th>
			<td><?php echo $responsavelForm['endereco']['cidade'] ?><?php echo form_error('cidade'); ?></td>
		</tr>
		<tr>
			<th><?php echo $responsavelForm['endereco']['bairro']->renderLabel(); ?></th>
			<td><?php echo $responsavelForm['endereco']['bairro'] ?><?php echo form_error('bairro'); ?></td>
			<th><?php echo $responsavelForm['endereco']['sg_uf']->renderLabel(); ?></th>
			<td><?php echo $responsavelForm['endereco']['sg_uf'] ?><?php echo form_error('sg_uf'); ?></td>
		</tr>
	</tbody>
</table>

<?php
	comandos_form(
		link_to(
			':: Voltar ::',
			$sf_context->getModuleName().'/list',
			array('class' => 'btn')
		),
		submit_tag(':: Salvar ::', array('class' => 'btn btn-primary'))
	);
?>
</form>

<script type="text/javascript">
$(function(){
	$('#aluno_responsavel_dt_nascimento').mask('99/99/9999');
	$('#aluno_responsavel_nu_cpf').mask('999.999.999-99');
	$('#aluno_responsavel_nu_telefone').mask('(99) 9999-9999');
	$('#aluno_responsavel_nu_telefone_comercial').mask('(99) 9999-9999');
	$('#aluno_responsavel_nu_telefone_celular').mask('(99) 9999-9999');
	$('#aluno_responsavel_endereco_nu_cep').mask('99999-999');

	System.formdata.save(new Array("msgAlerta", "Atenção:"), true);
});
</script>